﻿using System;

namespace GameDesigner.Source.Widgets
{
    class ActiveObject
    {
        private static object _Object;

        public delegate void ObjectChangedHandler(object game);
        public static event ObjectChangedHandler ObjectChangedEvent;

        public static object Object
        {
            get
            {
                return _Object;
            }
            set
            {
                if (_Object != value)
                {
                    _Object = value;
                    if (ObjectChangedEvent != null)
                    {
                        ObjectChangedEvent(value);
                    }
                }
            }
        }
    }
}
